package com.jh.calendar;

import java.util.Calendar;
import java.util.GregorianCalendar;

public class Calendar_API 
{

	/**
	 * @param args
	 */
	public static void main(String[] args) 
	{
		Calendar cal2 = Calendar.getInstance(); //객체의 주소만을 가지고 옴
		Calendar cal = new GregorianCalendar(); // Calendar 를 상속 받아 구현
		GregorianCalendar calG = new GregorianCalendar();
		
		cal.set(2013, 0, 22);
		
		
		int lastDay = cal.get(Calendar.DAY_OF_WEEK);
		System.out.println(Calendar.SUNDAY+"API 달력은 일요일이 1이다.");
		System.out.println(lastDay);
		switch (lastDay) 
		{
		case Calendar.SUNDAY:
			System.out.println("일요일");
			break;
		case Calendar.MONDAY:
			System.out.println("월요일");
			break;
		case Calendar.TUESDAY:
			System.out.println("화요일");
			break;
		case Calendar.WEDNESDAY:
			System.out.println("수요일");
			break;
		case Calendar.THURSDAY:
			System.out.println("목요일");
			break;
		case Calendar.FRIDAY:
			System.out.println("금요일");
			break;
		case Calendar.SATURDAY:
			System.out.println("토요일");
			break;
			
		default:
			break;
		}
	
		

		
	}

}
